package org.mobai.service.impl;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.mobai.mapper.OrderItemDao;
import org.mobai.model.OrderItem;
import org.mobai.service.IOrderItemService;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.Date;
import java.util.List;

/**
 * @author Administrator
 * @version v1.0
 * @className OrderItemServiceImpl
 * @description
 * @date 2024/5/11 星期六 14:42
 **/
@Service
public class OrderItemServiceImpl extends ServiceImpl<OrderItemDao, OrderItem> implements IOrderItemService {
    @Override
    public List<OrderItem> listByParam() {
        QueryWrapper<OrderItem> wrapper = new QueryWrapper<>();
        Date date = new Date();

        wrapper.between("item_time", DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()));

        List<OrderItem> list = list(wrapper);
        System.out.println(list);
        return Collections.emptyList();
    }
}
